<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>课程详情</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
            margin: 0;
            padding: 20px;
        }

        .container {
            max-width: 600px;
            margin: 50px auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
        }

        h1 {
            text-align: center;
            color: #333;
        }

        .course-details {
            margin-bottom: 20px;
        }

        .course-details label {
            font-weight: bold;
            margin-top: 10px;
            display: block;
        }

        .course-details p {
            margin: 5px 0 15px 0;
            padding: 10px;
            background-color: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        .actions {
            text-align: center;
        }

        .actions a {
            display: inline-block;
            margin: 10px 5px;
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            text-decoration: none;
            border-radius: 4px;
        }

        .actions a:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="container">
    <h1>课程详情</h1>
    <div class="course-details">
        <label>课程编号:</label>
        <p th:text="${course.courseId}">Course ID</p>

        <label>课程名称:</label>
        <p th:text="${course.courseName}">Course Name</p>

        <label>课程学分:</label>
        <p th:text="${course.courseScore}">Course Score</p>

        <label>课时:</label>
        <p th:text="${course.courseTime}">Course Time</p>

        <label>课程类型:</label>
        <p th:text="${course.courseType}">Course Type</p>

        <label>备注:</label>
        <p th:text="${course.description}">Description</p>
    </div>
    <div class="actions">
        <a th:href="@{/course/updateCourse/{id}(id=${course.courseId})}">更新课程</a>
        <form th:action="@{/course/deleteCourse/{id}(id=${course.courseId})}" method="post" style="display:inline;">
            <input type="hidden" name="_method" value="delete">
            <input type="submit" value="删除课程" onclick="return confirm('确认删除此课程吗？');">
        </form>
        <a th:href="@{/course/findAll}">返回课程列表</a>
    </div>
</div>
</body>
</html>
